package com.googlecode.cswish.struts.spring;

import java.io.IOException;

import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.filter.TypeFilter;

public class ServiceTypeFilter implements TypeFilter{

	@Override
	public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException {
		String name = metadataReader.getResource().getFile().getName();
		boolean match = true;
		if (name.endsWith("$1.class")) {
			match = false;
		}
		return match;
	}
}
